<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   <div id="app" >
       <input type="button" value="添加" @click="add">
       <input type="button" value="删除" @click="del">
    <li v-for="i in arr" v-bind:title="i">
        我向往的城市：{{i}}。
    </li>
    <h1 v-for="b in get " v-bind:title="b.name">
        {{b.name}}
    </h1>
   </div>
   <script src="./vue.js"></script>
   <script>
       var app=new Vue({
           el:"#app",
           data:{
               arr:['北京','上海','广州','深圳'],
               get:[
                   {name:"嘻嘻嘻嘻嘻嘻嘻嘻"},
                   {name:"哈哈哈哈哈哈哈哈"}
               ]
           },
           methods: {
               add:function(){
                   this.get.push({name:"咔咔咔咔咔咔"});
                },
                del:function(){
                    this.get.shift();
                }
           },
       })
   </script>
</body>
</html>